Using sliders
Slider is a variable controller that allows users to change numerical values using a visual indicator between a minimum and a maximum value. A slider has two child nodes: a rail and a knob. As user moves the knob along the rail (within its bounding box) the slider generates messages: drag started, drag finished, and value changed.
To give a slider a visual shape, you have to attach a mesh to the slider rail and knob.
Creating a slider
To create a slider:
- In the Project right-click the scene where you want to create a slider and select Create > Slider.
- In the Project expand the slider and add a mesh to the Rail and Knob nodes. Since the Knob moves along the Rail, make the Rail longer than the Knob.
For example, for the Rail, create a Box and increase its Width. For the Knob, create a Sphere.
- In the Project select the slider and in the Properties set:
- Slider Value property to the initial position of the knob on the rail.
- Slider Minimum Value property to define the lowest value of the knob.
- Slider Maximum Value property to define the highest value of the knob.
In the Preview you can now click and drag the knob along the rail.
See also
Using bindings
Open topic with navigation